//
//  WBNetworkManager+Extension.swift
//  传智微博
//
//  Created by FYXJ（6） on 2018/9/4.
//  Copyright © 2018年 FYXJ（6）. All rights reserved.
//

import Foundation

// MARK: - 封装请求方法
extension WBNetworkManager {

    func statusList(since_id: Int64 = 0,max_id: Int64 = 0, completion: @escaping (_ list:[[String: AnyObject]]?,_ isSuccess: Bool)->()) -> () {
        
        let urlString = "https://api.weibo.com/2/statuses/home_timeline.json"
        let params = ["since_id":"\(since_id)","max_id":"\(max_id)"]
        print("请求的参数\(params)")
        tokenRequest(URLString: urlString, parameters: params as [String : AnyObject]) { (json, isSucc) in
            let result = json?["statuses"] as? [[String: AnyObject]]
            completion(result,isSucc)
        }
    }
}
